#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n, a[100005];
int main(){
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    cin >> n;
    for(ll i = 1; i <= n; i++){
        cin >> a[i];
    }sort(a + 1, a + n + 1);
    ll ans = n, bef = 0, tmp;
    vector<ll>v;
    v.push_back(0);
    for(ll i = 1; i <= n;){
        tmp = i++;
        while(a[i] == a[i - 1]) i++;
        v.push_back(i - tmp);
    }for(ll i = 1; i < v.size(); i++){
        tmp = min(bef, v[i]);
        ans -= tmp;
        bef = bef - tmp + v[i];
    }cout << ans;
    return 0;
}
